package com.example.shiyan2;

import android.view.View;
import android.widget.TextView;

public class ExternalClickListener implements View.OnClickListener {

    private TextView textView;
    private String textToDisplay;

    public ExternalClickListener(TextView textView, String textToDisplay) {
        this.textView = textView;
        this.textToDisplay = textToDisplay;
    }

    @Override
    public void onClick(View v) {
        textView.setText(textToDisplay);
    }
}
